package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.HAttendInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.HAttendInfo;
import com.crm.jdy.common.mapper.HAttendInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(考勤表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class HAttendInfoServiceImpl  extends ServiceImpl<HAttendInfoMapper,HAttendInfo> implements HAttendInfoService  {

    @Autowired
    HAttendInfoMapper hAttendInfoMapper;





    @Override
    public PageInfo<HAttendInfo> seleteHAttendInfo(HAttendInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<HAttendInfo> bookList = hAttendInfoMapper.seleteHAttendInfo(wOutInfo);
        PageInfo<HAttendInfo> pageInfo = new PageInfo<HAttendInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateHAttendInfo(HAttendInfo wOutInfo) {
        return hAttendInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public boolean addHAttendInfo(HAttendInfo wOutInfo) {
        return hAttendInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean removeHAttendInfo(String attendId) {
        return hAttendInfoMapper.deleteById(attendId) > 0;
    }
}